package cn.ad.server.domain.enumration;

/**
 * Server 2 Server协议返回状态码
 * @author dongbin.yu
 * @from 2016-05-20
 * @since V1.0
 */
public enum ReturnCode {
    S0(0,"Success","成功"),
    E1(1,"Failed","失败"),
    E10000(10000,"System error","系统内部错误"),
    E10001(10001,"System maintenance","服务维护中"),
    E10002(10002,"Request api not found","请求接口不存在"),
    E10003(10003,"Request api version abandoned","请求接口版本已经弃废"),
    E10004(10004,"Service unavailable","服务暂停"),
    E10005(10005,"HTTP method is not supported for this request","请求方式HTTP_METHOD 不支持"),
    E10006(10006,"Requests out of rate limit","请求频次超过上限"),
    E10007(10007,"Miss required parameter {0},see doc for more info","缺失必选参数，参考API"),
    E10008(10008,"Parameter {0} value invalid, expect {1}, but get{2}","参数非法，需为{1}，实际为{2},请参考API"),
    E10009(10009,"appId is not exist","appId 不存在"),
    E10010(10010,"token expired","token 失效"),
    E10011(10011,"appKey is not exist","appKey 不存在"),
    E10012(10012,"token error, {0}","token 错误, {0}"),

    E20000(20000,"Illegal token","非法的口令"),
    E20001(20001,"Token expired","Token 访问时间过期"),
    E20002(20002,"Ad space is not found","广告位未找到"),
    E20003(20003,"match material is not exists","没有匹配的素材"),
    E20004(20004,"no match advertise","没有合适的广告"),
    E20005(20005,"width is to small","屏幕宽度太小，没有匹配素材");

    private int code;

    private String message;

    private String description;

    ReturnCode(int code, String message, String description) {
        this.code = code;
        this.message = message;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public String getDescription() {
        return description;
    }
}
